package com.zhima.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zhima.dto.*;
import com.zhima.entity.OjJudgeRecord;
import com.zhima.enums.JudgeState;
import com.zhima.vo.JudgeRecordVO;
import com.zhima.vo.SimpleJudgeRecordVO;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zhima
 * @since 2023-09-05
 */
public interface OjJudgeRecordService extends IService<OjJudgeRecord> {

    JudgeRecordVO queryJudgeRecordById(Long userId, Long judgeRecordId);

    String createJudgeRecord(UserDTO userDTO, SubmitJudgeDTO submitJudgeDTO);

    Page<SimpleJudgeRecordVO> pageQueryJudgeRecordBySomeConditions(QueryJudgeRecordDTO queryJudgeRecordDTO, Long pageNum, Long pageSize);

    boolean updateJudgeRecordState(Long judgeRecordId, JudgeState judgeRecordState);

    JudgeRecordVO queryJudgeRecordById(Long judgeRecordId);

    List<FeignCheckJudgeRecordDTO> feignQueryJudgeRecordByShardIndex(Integer shardIndex, Integer shardSize, Integer limit);

    boolean updateJudge0Result(Long judgeRecordId, FeignJudgeResult feignJudgeResult);

    boolean deleteQuestionJudgeRecord(Long questionId);

    boolean updateAiGuide(AiGuide aiGuide);
}
